﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Backend.Items;

namespace Backend.Actions
{
    class IteratorAction : Action
    {
        public override void ExecuteAction(GameItem Item)
        {
            if (Item.Items == null)
                foreach (GameItem IteratedItem in Item.Items)
                    IteratedItem.ExecuteAction();
            else
                foreach (GameItem IteratedItem in Item.Items)
                    ExecuteAction(IteratedItem);
        }
    }
}
